import {cloneDeep,merge} from "lodash"

import {UPDATE_MESSAGE, ADD_MESSAGE} from "../actions"

const initialState = {
  message: []
}

const handlers = {
  [ADD_MESSAGE]: (state, data) => {
    return merge()
  }
}
export default (state = initialState, action) => {
  const {type, data} = action
  if (!handlers[type]) {return state}
  return handlers[type](state, data)
}
